package com.example.creditapproval.service.impl;

import com.example.creditapproval.mapper.UserMapper;
import com.example.creditapproval.model.Users;
import com.example.creditapproval.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public void insertUser(Users users) {
        userMapper.insertUser(users);
    }

    @Override
    public Users getUserById(Integer userId) {
        return userMapper.getUserById(userId);
    }

    @Override
    public void updateUser(Users users) {
        userMapper.updateUser(users);
    }

    @Override
    public void deleteUser(Integer userId) {
        userMapper.deleteUser(userId);
    }
}
